package com.bcinfo.iccard.codec;

import org.apache.mina.core.session.IoSession;
import org.apache.mina.filter.codec.ProtocolCodecFactory;
import org.apache.mina.filter.codec.ProtocolDecoder;
import org.apache.mina.filter.codec.ProtocolEncoder;
/**
 * 编码解码工厂类，提供编码解码器
 * @author wangguangchun
 *
 */
public class ISO8583CodecFactory implements ProtocolCodecFactory {

	private final ISO8583Encoder iso8583Encoder=new ISO8583Encoder();
	private final ISO8583Decoder iso8583Decoder=new ISO8583Decoder();
	@Override
	public ProtocolDecoder getDecoder(IoSession arg0) throws Exception {
		// TODO Auto-generated method stub
		return iso8583Decoder;
	}

	@Override
	public ProtocolEncoder getEncoder(IoSession arg0) throws Exception {
		// TODO Auto-generated method stub
		return iso8583Encoder;
	}

}
